package com.atguigu.gmall.product;

import com.atguigu.gmall.common.config.Swagger2Config;
import com.atguigu.gmall.common.config.minio.annotation.EnableMinio;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

@SpringCloudApplication //这是一个cloud 服务自动开启服务发现 和服务熔断等功能
//@ComponentScan({"com.atguigu.gmall"})
@MapperScan(basePackages = "com.atguigu.gmall.product.mapper")
//TODO 启动类 启动只扫描本包 及其自包下  所以要导入需要的配置类 如果谁想要minio就直接导入Minio的自动配置
@Import({Swagger2Config.class}) //service-product 依赖了 Swagger
@EnableMinio  //开启minio注解
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.search"})//TODO 用到那个扫那个
public class   ServiceProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceProductApplication.class, args);
    }
}
